import java.util.ArrayList;
import java.util.Scanner;

public class Test05 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        ArrayList<Integer> list = new ArrayList<>();
        ArrayList<String> list1 = new ArrayList<>();
        for (int i = 1; i < s.length()/2; i++) {
            String str = s.substring(0,i);
            String str1 = s.substring(s.length()-i,s.length());
            if (str.equals(str1)) {
                list.add(i);
                list1.add(str1);
            }
        }
        if(list.isEmpty()){
            System.out.println("No");
        }else {
            String str3= s.substring(list.get(0),s.length()-list.get(0));
            if(str3.contains(list1.get(0))){
                System.out.println(list1.get(0));
            }else {
                System.out.println("No");
            }
        }



    }
}
